Optimal. Leaf size=87 \[ -\frac {4 a^4 \sin ^3(c+d x)}{3 d}+\frac {8 a^4 \sin (c+d x)}{d}+\frac {a^4 \sin (c+d x) \cos ^3(c+d x)}{4 d}+\frac {27 a^4 \sin (c+d x) \cos (c+d x)}{8 d}+\frac {35 a^4 x}{8} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.10, antiderivative size = 87, normalized size of antiderivative = 1.00, number of steps used = 10, number of rules used = 5, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.238, Rules used = {3791, 2637, 2635, 8, 2633} \[ -\frac {4 a^4 \sin ^3(c+d x)}{3 d}+\frac {8 a^4 \sin (c+d x)}{d}+\frac {a^4 \sin (c+d x) \cos ^3(c+d x)}{4 d}+\frac {27 a^4 \sin (c+d x) \cos (c+d x)}{8 d}+\frac {35 a^4 x}{8} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 8
Rule 2633
Rule 2635
Rule 2637
Rule 3791
Rubi steps
\begin {align*} \int \cos ^4(c+d x) (a+a \sec (c+d x))^4 \, dx &=\int \left (a^4+4 a^4 \cos (c+d x)+6 a^4 \cos ^2(c+d x)+4 a^4 \cos ^3(c+d x)+a^4 \cos ^4(c+d x)\right ) \, dx\\ &=a^4 x+a^4 \int \cos ^4(c+d x) \, dx+\left (4 a^4\right ) \int \cos (c+d x) \, dx+\left (4 a^4\right ) \int \cos ^3(c+d x) \, dx+\left (6 a^4\right ) \int \cos ^2(c+d x) \, dx\\ &=a^4 x+\frac {4 a^4 \sin (c+d x)}{d}+\frac {3 a^4 \cos (c+d x) \sin (c+d x)}{d}+\frac {a^4 \cos ^3(c+d x) \sin (c+d x)}{4 d}+\frac {1}{4} \left (3 a^4\right ) \int \cos ^2(c+d x) \, dx+\left (3 a^4\right ) \int 1 \, dx-\frac {\left (4 a^4\right ) \operatorname {Subst}\left (\int \left (1-x^2\right ) \, dx,x,-\sin (c+d x)\right )}{d}\\ &=4 a^4 x+\frac {8 a^4 \sin (c+d x)}{d}+\frac {27 a^4 \cos (c+d x) \sin (c+d x)}{8 d}+\frac {a^4 \cos ^3(c+d x) \sin (c+d x)}{4 d}-\frac {4 a^4 \sin ^3(c+d x)}{3 d}+\frac {1}{8} \left (3 a^4\right ) \int 1 \, dx\\ &=\frac {35 a^4 x}{8}+\frac {8 a^4 \sin (c+d x)}{d}+\frac {27 a^4 \cos (c+d x) \sin (c+d x)}{8 d}+\frac {a^4 \cos ^3(c+d x) \sin (c+d x)}{4 d}-\frac {4 a^4 \sin ^3(c+d x)}{3 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.10, size = 56, normalized size = 0.64 \[ \frac {a^4 (672 \sin (c+d x)+168 \sin (2 (c+d x))+32 \sin (3 (c+d x))+3 \sin (4 (c+d x))+420 c+420 d x)}{96 d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.90, size = 63, normalized size = 0.72 \[ \frac {105 \, a^{4} d x + {\left (6 \, a^{4} \cos \left (d x + c\right )^{3} + 32 \, a^{4} \cos \left (d x + c\right )^{2} + 81 \, a^{4} \cos \left (d x + c\right ) + 160 \, a^{4}\right )} \sin \left (d x + c\right )}{24 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 1.23, size = 96, normalized size = 1.10 \[ \frac {105 \, {\left (d x + c\right )} a^{4} + \frac {2 \, {\left (105 \, a^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} + 385 \, a^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 511 \, a^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 279 \, a^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right )}}{{\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 1\right )}^{4}}}{24 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.90, size = 111, normalized size = 1.28 \[ \frac {a^{4} \left (\frac {\left (\cos ^{3}\left (d x +c \right )+\frac {3 \cos \left (d x +c \right )}{2}\right ) \sin \left (d x +c \right )}{4}+\frac {3 d x}{8}+\frac {3 c}{8}\right )+\frac {4 a^{4} \left (2+\cos ^{2}\left (d x +c \right )\right ) \sin \left (d x +c \right )}{3}+6 a^{4} \left (\frac {\cos \left (d x +c \right ) \sin \left (d x +c \right )}{2}+\frac {d x}{2}+\frac {c}{2}\right )+4 a^{4} \sin \left (d x +c \right )+a^{4} \left (d x +c \right )}{d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.75, size = 104, normalized size = 1.20 \[ -\frac {128 \, {\left (\sin \left (d x + c\right )^{3} - 3 \, \sin \left (d x + c\right )\right )} a^{4} - 3 \, {\left (12 \, d x + 12 \, c + \sin \left (4 \, d x + 4 \, c\right ) + 8 \, \sin \left (2 \, d x + 2 \, c\right )\right )} a^{4} - 144 \, {\left (2 \, d x + 2 \, c + \sin \left (2 \, d x + 2 \, c\right )\right )} a^{4} - 96 \, {\left (d x + c\right )} a^{4} - 384 \, a^{4} \sin \left (d x + c\right )}{96 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 4.12, size = 89, normalized size = 1.02 \[ \frac {35\,a^4\,x}{8}+\frac {\frac {35\,a^4\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^7}{4}+\frac {385\,a^4\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5}{12}+\frac {511\,a^4\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3}{12}+\frac {93\,a^4\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{4}}{d\,{\left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+1\right )}^4} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F(-1)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Timed out} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________